package com.qfedu.index.tolist.service.service.impl;

import com.qfedu.entity.Room;
import com.qfedu.index.tolist.service.dao.RoomListDAO;
import com.qfedu.index.tolist.service.service.RoomListService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoomListServiceImpl implements RoomListService {
    @Resource
    private RoomListDAO roomListDAO;

    @Override
    public Room getRoomByRid(Integer rid) {
        Room room = roomListDAO.getRoomByRid(rid);
        return room;
    }

    @Override
    public List<Room> selectRoomByCityId(Integer cid) {
        List<Room> rooms = roomListDAO.selectRoomByCityId(cid);
        return rooms;
    }

    @Override
    public List<Room> getRoomsBySpId(Integer specialId, Integer pageNum, Integer pageSize) {
        List<Room> rooms = roomListDAO.getRoomsBySpId(specialId, pageNum, pageSize);
        return rooms;
    }


}
